<?php
	include_once("../util/constant.php");
	include_once("checkAuthenticationAction.php");
    include_once("../service/branchService.php");
	$id= $_GET["id"];
    $title = $_POST["branchTitle"];
    $order = $_POST["order"];
	$address = $_POST["address"];
	
	if(updateBranch($id,$title,$order,$address)){
	   echo "<script>window.location.href='../admin/branch-detail.php?action=".UPDATE_SUCCESSFULLY."&id=".$id."';</script>";   
	}else{
	   echo "<script>window.location.href='../admin/branch-detail.php?action=".UPDATE_FAILED."&id=".$id."';</script>";
	}
	
		
?>